﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_Popup.Master" CodeBehind="ProductPopup.aspx.vb" Inherits="I_PORT.ProductPopup" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
    
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" language="javascript" >
        function checkNumber(e)
{
var keycode;

if (window.event) keycode = window.event.keyCode; // ใช้ IE อ่ะ

else if (e) keycode = e.which; // ใช้ Firefox เน่าะ

 if (((keycode > 47) && (keycode < 58))||(keycode == 190)||(keycode == 46))
 {
 return true;
 }
return false;
}
</script>
<asp:UpdatePanel ID="UpdatePanelProduct" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                       <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                  
           <tr>
             <td colspan="2" >
               <table width="100%" border="0" cellpadding="2" cellspacing="0">
               <tr>
             <td style="width:220px;" align="right"><asp:Label ID="lbProduct" runat="server" SkinID="lbtxt" Text="PRODUCT :"></asp:Label>&nbsp;</td>
             <td align="left">
                 <asp:DropDownList ID="ddlProduct" runat="server" AutoPostBack="true" SkinID="ddl" >
                     <asp:ListItem Value="L">Load</asp:ListItem>
                     <asp:ListItem Value="D">Disch</asp:ListItem>
<%--                     <asp:ListItem Value="R">Load(IRPC)</asp:ListItem>
                     <asp:ListItem Value="I">Disch(IRPC)</asp:ListItem>--%>
                 </asp:DropDownList>
              </td>
           </tr>
                  <tr>
                  <td style="width:220px;" align="right"><asp:Label ID="label47" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label31" runat="server" SkinID="lbtxt" Text="PRODUCT NAME :"></asp:Label>&nbsp;</td>
             <td align="left">
                 <asp:TextBox ID="txtProductName" runat="server" Width="240px" MaxLength="200"></asp:TextBox>
                 &nbsp;<asp:Label ID="label12" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label35" runat="server" SkinID="lbtxt" Text="AMOUNT : "></asp:Label>&nbsp;<asp:TextBox ID="txtProduct" runat="server" Width="60px" MaxLength="10" onkeypress="return checkNumber(this);"></asp:TextBox>&nbsp;<asp:DropDownList ID="ddlUnit" runat="server" SkinID="ddl">
                 <asp:ListItem>MT</asp:ListItem>
                 <asp:ListItem>ML</asp:ListItem>
                 <asp:ListItem>KB</asp:ListItem>
                 </asp:DropDownList>
                 <asp:AutoCompleteExtender  runat="server" ID="AutoCompleteExtender3" BehaviorID="AutoCompleteEx3" CompletionInterval="50"
                     TargetControlID="txtProductName" ServicePath="../WebService/AutoComplete_IPORT.asmx" MinimumPrefixLength="1" 
                    ServiceMethod="GetProduct" CompletionListCssClass="autocomplete_completionListElement" ContextKey="0"
                CompletionListItemCssClass="autocomplete_listItem" 
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" >
                <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteEx3');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".3">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteEx3')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".3">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteEx3')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </Animations>
                 </asp:AutoCompleteExtender>
             </td>
                  </tr>
               </table>
             </td>
             
           </tr>
           <tr id="rowLiquid" runat="server">
              <td colspan="2">
                 <table width="100%" border="0" cellpadding="2" cellspacing="0">
                       <tr id="rowLoadL" runat="server" visible="true">
                          <td colspan="2" >
                             <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                                    <tr>
                    <td style="width:220px;" valign="top" align="right"><asp:Label ID="label13" runat="server" Text="*" ForeColor="Red" ></asp:Label>&nbsp;<asp:Label ID="Label33" runat="server" SkinID="lbtxt" Text="BUYER : "></asp:Label>&nbsp;</td>
             <td align="left" valign="bottom">
             <asp:TextBox ID="txtBuyerLoad" runat="server" ></asp:TextBox>&nbsp;<asp:Label ID="label8" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label34" runat="server" SkinID="lbtxt" Text="SELLER : "></asp:Label>&nbsp;<asp:DropDownList ID="ddlSellerLoad" runat="server" SkinID="ddl" ></asp:DropDownList>
             </td>
                    </tr>
                                <tr>
                                <td style="width:220px;" valign="top" align="right">&nbsp;<asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text="DISCHARGING PORT : "></asp:Label>&nbsp;</td>
                                       <td align="left" valign="bottom">
                                           <asp:TextBox ID="txtLoadDestination" runat="server" MaxLength="200" 
                                               Width="280px"></asp:TextBox>
                                        </td>
                                </tr>
                             </table>
                 </td>
                             
           </tr>
           <tr id="rowDischL" runat="server" visible="false">
              <td colspan="2" >
                 <table width="100%" border="0" cellpadding="2" cellspacing="0" >
                                <tr>
                                <td style="width:220px;" valign="top" align="right">&nbsp;<asp:Label ID="label9" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label7" runat="server" SkinID="lbtxt" Text="BUYER : "></asp:Label>&nbsp;</td>
                                       <td align="left" valign="bottom">
                                   <asp:DropDownList ID="ddlBuyerDisch" runat="server" SkinID="ddl"></asp:DropDownList>&nbsp;<asp:Label ID="label14" runat="server" Text="*" ForeColor="Red" ></asp:Label>&nbsp;<asp:Label ID="Label32" runat="server" SkinID="lbtxt" Text="SELLER : "></asp:Label>&nbsp;<asp:TextBox ID="txtSellerDisch" runat="server"></asp:TextBox>
                                        </td>
                                </tr>
                    <tr>
                    <td style="width:220px;" valign="top" align="right">&nbsp;<asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text="LOADING PORT : "></asp:Label>&nbsp;</td>
             <td align="left" valign="bottom">
                  <asp:TextBox ID="txtDischDestination" runat="server" MaxLength="200" 
                      Width="280px"></asp:TextBox>
             </td>
                    </tr>
                 </table>
              </td>
           
              
           </tr>
                 </table>
              </td>
           </tr>
           <tr id="rowBulk" runat="server">
              <td colspan="2">
                 <table width="100%" border="0" cellpadding="2" cellspacing="0">
             <tr id="rowLoadB" runat="server" >
              <td style="width:220px;" valign="top" align="right">&nbsp;<asp:Label ID="Label4" runat="server" SkinID="lbtxt" Text="BUYER : "></asp:Label>&nbsp;</td>
             <td align="left" valign="bottom">
             <asp:TextBox ID="txtBuyerBulkLoad" runat="server" ></asp:TextBox>&nbsp;<asp:Label ID="label10" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label5" runat="server" SkinID="lbtxt" Text="SELLER : "></asp:Label>&nbsp;<asp:TextBox ID="txtOwner_Product" runat="server" Width="330px" ></asp:TextBox>
                   <asp:AutoCompleteExtender  runat="server" ID="AutoCompleteExtender4" BehaviorID="AutoCompleteExOwner" CompletionInterval="50"
                     TargetControlID="txtOwner_Product" ServicePath="../WebService/AutoComplete_IPORT.asmx" MinimumPrefixLength="3" 
                    ServiceMethod="GetCustomer" CompletionListCssClass="autocomplete_completionListElement"
                CompletionListItemCssClass="autocomplete_listItem"
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" >
                <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteExOwner');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".3">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteExOwner')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".3">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteExOwner')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </Animations>
                 </asp:AutoCompleteExtender>
             </td>
           </tr>
             <tr id="rowDischB" runat="server" visible="false">
              <td style="width:220px;" valign="top" align="right">&nbsp;<asp:Label ID="label11" runat="server" Text="*" ForeColor="Red" ></asp:Label><asp:Label ID="Label3" runat="server" SkinID="lbtxt" Text="BUYER : "></asp:Label>&nbsp;</td>
              <td align="left" valign="bottom">
                   <asp:TextBox ID="txtOwner_ProductDisch" runat="server" Width="330px" ></asp:TextBox>&nbsp;<asp:Label ID="Label6" runat="server" SkinID="lbtxt" Text="SELLER : "></asp:Label>&nbsp;<asp:TextBox ID="txtSellerBulkDisch" runat="server"></asp:TextBox>
                   <asp:AutoCompleteExtender  runat="server" ID="AutoCompleteExtender1" BehaviorID="AutoCompleteExOwnerDisch" CompletionInterval="50"
                     TargetControlID="txtOwner_ProductDisch" ServicePath="../WebService/AutoComplete_IPORT.asmx" MinimumPrefixLength="3" 
                    ServiceMethod="GetCustomer" CompletionListCssClass="autocomplete_completionListElement"
                CompletionListItemCssClass="autocomplete_listItem"
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" >
                <Animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteExOwnerDisch');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".3">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteExOwnerDisch')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".3">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteExOwnerDisch')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </Animations>
                 </asp:AutoCompleteExtender>
             </td>
           </tr>
            <tr>
                 <td style="width:220px;" valign="top" align="right"><asp:Label ID="lbBulkDestination" runat="server" SkinID="lbtxt" Text="DISCHARGING PORT : "></asp:Label>&nbsp;</td>
             <td align="left" valign="bottom">
                 <asp:TextBox ID="txtBulkDestination" runat="server" MaxLength="200" 
                     Width="280px"></asp:TextBox>
             </td>
                 </tr>
                 </table>
              </td>
           </tr>
           <tr>
            <td colspan="2">
              <table width="100%" border="0" cellpadding="2" cellspacing="0">
                 <tr>
                 <td style="width:220px;" valign="top" align="right"><asp:Label ID="lbProductType" runat="server" SkinID="lbtxt" Text="REMARK : "></asp:Label>&nbsp;</td>
             <td align="left" valign="bottom">
             <asp:TextBox ID="txtDescription" TextMode="MultiLine" Height="45px" runat="server" Width="300px"></asp:TextBox>
             </td>
                 </tr>
                 <tr>
                 <td style="width:220px;" valign="top" align="right">&nbsp;</td>
                 <td align="left" valign="bottom">
                    <asp:Button ID="btnSave" runat="server" Text="ADD" CssClass="ButtonStyle" />
                    <asp:Button ID="btnClose" runat="server" Text="CLOSE" CssClass="ButtonStyle" />
                  </td>
                 </tr>
              </table>
            </td>
              
           </tr>
                       </table>
                    </ContentTemplate>
                 </asp:UpdatePanel>
</asp:Content>
